package com.qianniu.napi.admin.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.service.IService;
import com.qianniu.napi.admin.entity.Order;
import com.qianniu.napi.admin.entity.Saccount;
import com.qianniu.napi.admin.entity.SaccountFlow;
import com.qianniu.napi.admin.entity.penum.IotypeEnum;
import com.qianniu.napi.admin.entity.penum.XftypeEnum;

import java.math.BigDecimal;

/**
 * <p>
 * 商家账务流水表
 * </p>
 *
 * @author chenxuebin
 * @since 2018-08-08
 */
public interface ISaccountService extends IService<Saccount> {

    public void addSamountInFlow(Order order, XftypeEnum xftype, boolean confirm);

    public void saccountFlowInConfirm(Order order, Boolean ruzhang);

    public void addSamountRuzhangFlow(Order order);

    //流水记录表
    public void addSaccountOutFlow(SaccountFlow maf);

    public Saccount initSaccount(Long mid, Long mpid, Long sid, Long leagueid);

    public JSONObject tixian(Long sid, BigDecimal money);

}
